package com.dglg.spring.service.impl;

import com.dglg.spring.dao.AttendanceDao;
import com.dglg.spring.model.Attendance;
import com.dglg.spring.service.AttendanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class AttendanceServiceImpl implements AttendanceService {

    @Autowired
    private AttendanceDao attendanceDao;

    @Override
    public List<Attendance> getAttendanceByParams(String trainingClassName, String studentId) {
        return this.attendanceDao.getAttendanceByParams(trainingClassName, studentId);
    }

    @Override
    public int insert(Attendance attendance) {
        return this.attendanceDao.insert(attendance);
    }
}
